package top.buluoluo.productservice.enums;

public enum DiscountTypeMethod {
    PERCENTAGE("百分比"),
    FIXED("固定金额");

    private final String description;


    DiscountTypeMethod(String description) {
        this.description = description;
    }
    public static DiscountTypeMethod fromValue(String value) {
        for (DiscountTypeMethod method : values()) {
            if (method.name().equalsIgnoreCase(value)) {
                return method;
            }
        }
        throw new IllegalArgumentException("未知折扣状态: " + value);
    }
}
